Carbon


GetNewCollection

Header: Collections.h Carbon status: Supported

Reads a collection in from a collection ('cltn') resource.

Collection GetNewCollection (
    SInt16 collectionID
);
collectionID

The resource ID associated with the collection resource from which you want to create the new collection object.

function result

A reference to the new collection object. If this function does not find a collection resource with the specified resource ID, it returns NULL as the function result.

DISCUSSION

This function searches the current resource file path for a collection ('cltn') resource with the resource ID specified by the collectionID parameter. If it finds such a resource, this function creates a new collection object, initializes it with the information stored in the resource, and returns a reference to it as the function result.

You can use the MemError and ResError functions to check for other errors after calling this function.

For information about collection resources, see ëcltn’.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)